﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class CustomControls_FeaturedArticles : UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //repFeaturedArticles.DataSource = Entities.GetFeaturedArticles(5);
        //repFeaturedArticles.DataBind();
        repRecentNews.DataSource = Entities.GetFeaturedArticles(5);
        repRecentNews.DataBind();
        //if (!Page.ClientScript.IsClientScriptBlockRegistered(Page.GetType(), "contentslider"))
        //    Page.ClientScript.RegisterClientScriptBlock(
        //        Page.GetType(),
        //        "contentslider",
        //        Environment.NewLine + @"<link href=""contentslider.css"" rel=""stylesheet"" type=""text/css"" />");
        var l = new Literal();
        l.Text = Environment.NewLine + @"<link href=""contentslider.css"" rel=""stylesheet"" type=""text/css"" />";
        Page.Header.Controls.Add(l);
    }
}